#ifndef LOGINWIDGET_H
#define LOGINWIDGET_H

#include <QWidget>
#include <QDebug>
#include "userdata.h"
#include "settingdialog.h"

namespace Ui {
    class LogInWidget;
}

class LogInWidget : public QWidget
{
    Q_OBJECT

public:
    explicit LogInWidget(QWidget *parent = 0);
    ~LogInWidget();



signals:
    void login(UserData *);
    void launchUI(UserData *);
    void sendIPPortToMainWidget(QString, int);

public slots:
    void handleSuccessfulLogin(UserData *);
    void handleLoginError(QString);

private slots:
    void on_submitButton_clicked();
    void sendIPPort(QString, int);
    void on_settingButton_clicked();

private:
    Ui::LogInWidget *ui;
    SettingDialog *setting;
};

#endif // LOGINWIDGET_H
